Enable minimal functionality of private worker pools with Cloud Build & Cloud Scheduler #211
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an extremely minimal first pass. My aim here was to make creating & scheduling a build work when the yaml specifies a private worker pool by setting the option
The general strategy I took was to create a helper function that tests whether the build yaml has set the above option, and then create the API uri differently in that case. I've verified that a basic workflow using
cr_build()
,cr_schedule_http()
&cr_schedule()
work with private worker pools with these changes. I couldn't run the tests, even with no changes, tons of stuff was failing right out of the gate, so I'm not 100% sure of how much other stuff I might have broken with these changes.If you think this is a decent approach I'll try manually testing other parts of the package to see if there are other places similar adjustments may be needed to handle private worker pools.